﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Com.CMS263.PO;

namespace Com.CMS263.DAO
{
   public class MarryShowDAO:BaseService
    {
        public int GetCount()
        {

            return int.Parse(base.GetValue("select count(Id) from MarryShow ").ToString());
        }

        public IList<Com.CMS263.PO.MarryShow> GetPagerList(int page, int pageSize)
        {
            return FindList<MarryShow>("from MarryShow", null, pageSize * (page - 1), pageSize);
        }
       /// <summary>
        /// 查询幸福ing那四个，可以改变查询个数
       /// </summary>
       /// <param name="count"></param>
       /// <returns></returns>
        public IList<MarryShow> GetListByCount(int count)
        {
            string hql = "from MarryShow order by OrderNum";
            return FindList<MarryShow>(hql, null, 0, 4);
        }

        public MarryShow FindModel()
        {
            string hql = "from MarryShow order by OrderNum";
            return FindList<MarryShow>(hql, null, null, null)[0];
        }
    }
}
